using QueryBuilder.Core.Query.SqlTypes;

namespace QueryBuilder.Core.Query.Type
{
    /// <summary>
    /// 
    /// </summary>
    public abstract class PrimitiveType : ITypeMapping
    {
        /// <summary>
        /// 
        /// </summary>
        private SqlType sqlType;

        /// <summary>
        /// Initializes a new instance of the <see cref="PrimitiveType"/> class.
        /// </summary>
        /// <param name="sqlType">Type of the SQL.</param>
        public PrimitiveType(SqlType sqlType)
        {
            this.sqlType = sqlType;
        }

        /// <summary>
        /// Gets the default value.
        /// </summary>
        /// <value>The default value.</value>
        public abstract object DefaultValue { get; }

        #region ITypeMapping Members

        /// <summary>
        /// Gets the name.
        /// </summary>
        /// <value>The name.</value>
        public abstract string Name { get; }

        /// <summary>
        /// Gets the returned class.
        /// </summary>
        /// <value>The returned class.</value>
        public abstract System.Type ReturnedClass { get; }

        #endregion

        /// <summary>
        /// Gets or sets the type of the SQL.
        /// </summary>
        /// <value>The type of the SQL.</value>
        public SqlType SqlType
        {
            get { return this.sqlType; }
            set { this.sqlType = value; }
        }
    }
}